/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ChessApps.Network;

import com.ChessApps.Interface.Interface;
import java.io.IOException;

/**
 *
 * @author eikichie
 */
public class ThreadClientChat extends Thread
{
	Interface ref;
        int i=0;
	public ThreadClientChat(Interface r)
	 {
		ref = r;
	 }
           
	public void run()
	 { 
		while(true)
		 {    
                     
                     
                    
			try
			 {
				while(ref.getIs().available() == 0)
				 {  
					try
					 {
						Thread.sleep(100);
					 }
					catch(InterruptedException e)
					 {
						System.out.println(e);
					 }
				 }
                                
				ref.lireSocket();
			 }
			catch(IOException e)
			 {
				System.out.println(e);
			 }
		 }
	 }
 }
